<nb-card style="overflow-x:auto;overflow-y:hidden">
        <nb-card-header>
                班级课表查询
        </nb-card-header>

        <nb-card-body>
                <div class="form-group">
                        <div>
                                <label>选择班级：</label>

                                <input-select [ApiUrl]="'Public/ClassesList'" (myModelChange)="myModelChange($event)"
                                        [multiple]="false">
                                </input-select>
                        </div>
                </div>

                <table width="100%" *ngIf="this.bean" border="1" cellpadding="5">
                        <tr>
                                <td colspan="8" style="text-align: center;">{{this.bean.name}}</td>
                        </tr>
                        <tr>
                                <td>节数</td>
                                <td>周一</td>
                                <td>周二</td>
                                <td>周三</td>
                                <td>周四</td>
                                <td>周五</td>
                                <td>周六</td>
                        </tr>
                        <tr>
                                <td>第一节</td>
                                <td (click)="clickCourse('a11',dialog)"><span
                                                *ngIf='this.bean.courseDic["a11"].teacher_name'>{{this.bean.courseDic["a11"].teacher_name}}:{{this.bean.courseDic["a11"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a12',dialog)"><span
                                                *ngIf='this.bean.courseDic["a12"].teacher_name'>{{this.bean.courseDic["a12"].teacher_name}}:{{this.bean.courseDic["a12"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a13',dialog)"><span
                                                *ngIf='this.bean.courseDic["a13"].teacher_name'>{{this.bean.courseDic["a13"].teacher_name}}:{{this.bean.courseDic["a13"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a14',dialog)"><span
                                                *ngIf='this.bean.courseDic["a14"].teacher_name'>{{this.bean.courseDic["a14"].teacher_name}}:{{this.bean.courseDic["a14"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a15',dialog)"><span
                                                *ngIf='this.bean.courseDic["a15"].teacher_name'>{{this.bean.courseDic["a15"].teacher_name}}:{{this.bean.courseDic["a15"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a16',dialog)"><span
                                                *ngIf='this.bean.courseDic["a16"].teacher_name'>{{this.bean.courseDic["a16"].teacher_name}}:{{this.bean.courseDic["a16"].course_name}}</span>
                                </td>
                        </tr>
                        <tr>
                                <td>第二节</td>
                                <td (click)="clickCourse('a21',dialog)"><span
                                                *ngIf='this.bean.courseDic["a21"].teacher_name'>{{this.bean.courseDic["a21"].teacher_name}}:{{this.bean.courseDic["a21"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a22',dialog)"><span
                                                *ngIf='this.bean.courseDic["a22"].teacher_name'>{{this.bean.courseDic["a22"].teacher_name}}:{{this.bean.courseDic["a22"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a23',dialog)"><span
                                                *ngIf='this.bean.courseDic["a23"].teacher_name'>{{this.bean.courseDic["a23"].teacher_name}}:{{this.bean.courseDic["a23"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a24',dialog)"><span
                                                *ngIf='this.bean.courseDic["a24"].teacher_name'>{{this.bean.courseDic["a24"].teacher_name}}:{{this.bean.courseDic["a24"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a25',dialog)"><span
                                                *ngIf='this.bean.courseDic["a25"].teacher_name'>{{this.bean.courseDic["a25"].teacher_name}}:{{this.bean.courseDic["a25"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a26',dialog)"><span
                                                *ngIf='this.bean.courseDic["a26"].teacher_name'>{{this.bean.courseDic["a26"].teacher_name}}:{{this.bean.courseDic["a26"].course_name}}</span>
                                </td>
                        </tr>
                        <tr>
                                <td>第三节</td>
                                <td (click)="clickCourse('a31',dialog)"><span
                                                *ngIf='this.bean.courseDic["a31"].teacher_name'>{{this.bean.courseDic["a31"].teacher_name}}:{{this.bean.courseDic["a31"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a32',dialog)"><span
                                                *ngIf='this.bean.courseDic["a32"].teacher_name'>{{this.bean.courseDic["a32"].teacher_name}}:{{this.bean.courseDic["a32"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a33',dialog)"><span
                                                *ngIf='this.bean.courseDic["a33"].teacher_name'>{{this.bean.courseDic["a33"].teacher_name}}:{{this.bean.courseDic["a33"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a34',dialog)"><span
                                                *ngIf='this.bean.courseDic["a34"].teacher_name'>{{this.bean.courseDic["a34"].teacher_name}}:{{this.bean.courseDic["a34"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a35',dialog)"><span
                                                *ngIf='this.bean.courseDic["a35"].teacher_name'>{{this.bean.courseDic["a35"].teacher_name}}:{{this.bean.courseDic["a35"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a36',dialog)"><span
                                                *ngIf='this.bean.courseDic["a36"].teacher_name'>{{this.bean.courseDic["a36"].teacher_name}}:{{this.bean.courseDic["a36"].course_name}}</span>
                                </td>
                        </tr>
                        <tr>
                                <td>第四节</td>
                                <td (click)="clickCourse('a41',dialog)"><span
                                                *ngIf='this.bean.courseDic["a41"].teacher_name'>{{this.bean.courseDic["a41"].teacher_name}}:{{this.bean.courseDic["a41"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a42',dialog)"><span
                                                *ngIf='this.bean.courseDic["a42"].teacher_name'>{{this.bean.courseDic["a42"].teacher_name}}:{{this.bean.courseDic["a42"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a43',dialog)"><span
                                                *ngIf='this.bean.courseDic["a43"].teacher_name'>{{this.bean.courseDic["a43"].teacher_name}}:{{this.bean.courseDic["a43"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a44',dialog)"><span
                                                *ngIf='this.bean.courseDic["a44"].teacher_name'>{{this.bean.courseDic["a44"].teacher_name}}:{{this.bean.courseDic["a44"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a45',dialog)"><span
                                                *ngIf='this.bean.courseDic["a45"].teacher_name'>{{this.bean.courseDic["a45"].teacher_name}}:{{this.bean.courseDic["a45"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a46',dialog)"><span
                                                *ngIf='this.bean.courseDic["a46"].teacher_name'>{{this.bean.courseDic["a46"].teacher_name}}:{{this.bean.courseDic["a46"].course_name}}</span>
                                </td>
                        </tr>
                        <tr>
                                <td>第五节</td>
                                <td (click)="clickCourse('a51',dialog)"><span
                                                *ngIf='this.bean.courseDic["a51"].teacher_name'>{{this.bean.courseDic["a51"].teacher_name}}:{{this.bean.courseDic["a51"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a52',dialog)"><span
                                                *ngIf='this.bean.courseDic["a52"].teacher_name'>{{this.bean.courseDic["a52"].teacher_name}}:{{this.bean.courseDic["a52"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a53',dialog)"><span
                                                *ngIf='this.bean.courseDic["a53"].teacher_name'>{{this.bean.courseDic["a53"].teacher_name}}:{{this.bean.courseDic["a53"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a54',dialog)"><span
                                                *ngIf='this.bean.courseDic["a54"].teacher_name'>{{this.bean.courseDic["a54"].teacher_name}}:{{this.bean.courseDic["a54"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a55',dialog)"><span
                                                *ngIf='this.bean.courseDic["a55"].teacher_name'>{{this.bean.courseDic["a55"].teacher_name}}:{{this.bean.courseDic["a55"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a56',dialog)"><span
                                                *ngIf='this.bean.courseDic["a56"].teacher_name'>{{this.bean.courseDic["a56"].teacher_name}}:{{this.bean.courseDic["a56"].course_name}}</span>
                                </td>
                        </tr>
                        <tr>
                                <td>第六节</td>
                                <td (click)="clickCourse('a61',dialog)"><span
                                                *ngIf='this.bean.courseDic["a61"].teacher_name'>{{this.bean.courseDic["a61"].teacher_name}}:{{this.bean.courseDic["a61"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a62',dialog)"><span
                                                *ngIf='this.bean.courseDic["a62"].teacher_name'>{{this.bean.courseDic["a62"].teacher_name}}:{{this.bean.courseDic["a62"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a63',dialog)"><span
                                                *ngIf='this.bean.courseDic["a63"].teacher_name'>{{this.bean.courseDic["a63"].teacher_name}}:{{this.bean.courseDic["a63"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a64',dialog)"><span
                                                *ngIf='this.bean.courseDic["a64"].teacher_name'>{{this.bean.courseDic["a64"].teacher_name}}:{{this.bean.courseDic["a64"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a65',dialog)"><span
                                                *ngIf='this.bean.courseDic["a65"].teacher_name'>{{this.bean.courseDic["a65"].teacher_name}}:{{this.bean.courseDic["a65"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a66',dialog)"><span
                                                *ngIf='this.bean.courseDic["a66"].teacher_name'>{{this.bean.courseDic["a66"].teacher_name}}:{{this.bean.courseDic["a66"].course_name}}</span>
                                </td>
                        </tr>
                        <tr>
                                <td>第七节</td>
                                <td (click)="clickCourse('a71',dialog)"><span
                                                *ngIf='this.bean.courseDic["a71"].teacher_name'>{{this.bean.courseDic["a71"].teacher_name}}:{{this.bean.courseDic["a71"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a72',dialog)"><span
                                                *ngIf='this.bean.courseDic["a72"].teacher_name'>{{this.bean.courseDic["a72"].teacher_name}}:{{this.bean.courseDic["a72"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a73',dialog)"><span
                                                *ngIf='this.bean.courseDic["a73"].teacher_name'>{{this.bean.courseDic["a73"].teacher_name}}:{{this.bean.courseDic["a73"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a74',dialog)"><span
                                                *ngIf='this.bean.courseDic["a74"].teacher_name'>{{this.bean.courseDic["a74"].teacher_name}}:{{this.bean.courseDic["a74"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a75',dialog)"><span
                                                *ngIf='this.bean.courseDic["a75"].teacher_name'>{{this.bean.courseDic["a75"].teacher_name}}:{{this.bean.courseDic["a75"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a76',dialog)"><span
                                                *ngIf='this.bean.courseDic["a76"].teacher_name'>{{this.bean.courseDic["a76"].teacher_name}}:{{this.bean.courseDic["a76"].course_name}}</span>
                                </td>
                        </tr>
                        <tr>
                                <td>第八节</td>
                                <td (click)="clickCourse('a81',dialog)">
                                        <span
                                                *ngIf='this.bean.courseDic["a81"].teacher_name'>{{this.bean.courseDic["a81"].teacher_name}}:{{this.bean.courseDic["a81"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a82',dialog)">
                                        <span
                                                *ngIf='this.bean.courseDic["a82"].teacher_name'>{{this.bean.courseDic["a82"].teacher_name}}:{{this.bean.courseDic["a82"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a83',dialog)">
                                        <span
                                                *ngIf='this.bean.courseDic["a83"].teacher_name'>{{this.bean.courseDic["a83"].teacher_name}}:{{this.bean.courseDic["a83"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a84',dialog)">
                                        <span
                                                *ngIf='this.bean.courseDic["a84"].teacher_name'>{{this.bean.courseDic["a84"].teacher_name}}:{{this.bean.courseDic["a84"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a85',dialog)">
                                        <span
                                                *ngIf='this.bean.courseDic["a85"].teacher_name'>{{this.bean.courseDic["a85"].teacher_name}}:{{this.bean.courseDic["a85"].course_name}}</span>
                                </td>
                                <td (click)="clickCourse('a86',dialog)">
                                        <span
                                                *ngIf='this.bean.courseDic["a86"].teacher_name'>{{this.bean.courseDic["a86"].teacher_name}}:{{this.bean.courseDic["a86"].course_name}}</span>
                                </td>
                        </tr>
                </table>
                <br />
                <table *ngIf="changeList && changeList.length==2">
                        <tr>
                                <td *ngFor="let item of changeList">{{item.order_num}}:{{item.course_name}}</td>
                                <td>
                                        <button (click)="ChangeCourse()" icon="refresh">交换</button>
                                </td>
                        </tr>
                </table>
        </nb-card-body>
</nb-card>


<ng-template #dialog let-data let-ref="dialogRef">
        <nb-card style="width: 200px;">
                <nb-card-header>{{ data.teacher_name }}</nb-card-header>
                <nb-card-body>
                        教师：{{ data.teacher_name }}<br />
                        课程：{{ data.course_name }}<br />
                        时间：{{ data.order_num }}<br />
                        场地：{{ data.address }}<br />
                </nb-card-body>
                <nb-card-footer>
                        <button nbButton (click)="ref.close()">关闭</button>
                </nb-card-footer>
        </nb-card>
</ng-template>